<!--
 * @Description  : 下载
 * @Author       : zhao
 * @Date         : 2022-08-08 09:30:31
 * @LastEditors  : zhao
 * @LastEditTime : 2022-08-08 10:08:14
-->
<template>
    <el-button type="primary" size="default" @click="download()" :loading="loading">下载</el-button>
</template>

<script setup lang='ts'>
import { ref } from 'vue'
import { storeToRefs } from "pinia";
import { useBorrow } from '/@/stores/borrow'
import { useDownloadExecl } from '/@/hooks/useDownloadEchartExecl.ts';
const user = useBorrow()
let { zTableFunAddShow } = <any>storeToRefs(user);
const loading = ref(false)
const download = async () => {
    loading.value = true;
    const data = await user.DownloadFormDetailExcel()
    loading.value = false
    useDownloadExecl().downloadExecl(data)
}
</script>
<style lang='scss' scoped>
</style>